﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Common.Infrastructure
{
    [AttributeUsage(AttributeTargets.Class, Inherited = true)]
    public class ModelServiceCodeAttribute : Attribute
    {
        private readonly string moduleCode = null;
       
        /// <summary>
        /// 
        /// </summary>
        /// <param name="serviceCode">ID字段名称</param> 
        public ModelServiceCodeAttribute(string serviceCode)
        {
            if (string.IsNullOrEmpty(serviceCode))
            {
                throw new Exception("moduleCode is null");
            }

            moduleCode = serviceCode;
        }

        /// <summary>
        /// 模块
        /// </summary>  
        public string ServiceCode
        {
            get { return moduleCode; }
        }
    }
}
